﻿@inherits BaseComponent

<Breadcrumb Style="margin:16px 0;">
    <BreadcrumbItem>
        <a href="/">
            @* <Icon Type="home" Style="cursor:pointer;" /> *@
            <span style="cursor:pointer;">@Language.Home</span>
        </a>
    </BreadcrumbItem>
    @if (Current != null)
    {
        @* if (Current.Parent != null)
        {
            if (Current.Parent.Parent != null)
            {
                <BreadcrumbItem>
                    <Icon Type="@Current.Parent.Parent.Icon" />
                    <span>@Language.GetString(Current.Parent.Parent)</span>
                </BreadcrumbItem>
            }
            <BreadcrumbItem>
                <Icon Type="@Current.Parent.Icon" />
                <span>@Language.GetString(Current.Parent)</span>
            </BreadcrumbItem>
        } *@
        if (Current.Name != "Home")
        {
            var menuName = Language.GetString(Current);
            <BreadcrumbItem>
                @* <Icon Type="@Current.Icon" /> *@
                <span>@menuName</span>
            </BreadcrumbItem>
        }
    }
</Breadcrumb>

@code {
    [Parameter] public MenuInfo Current { get; set; }
}